🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / node / src / main / kotlin / org / meshtastic / feature / node / list / NodeActions.kt
Displaying Raw • Download
feature/node/src/main/kotlin/org/meshtastic/feature/node/list/NodeActions.kt 92deae785e3ef853f6758a8e550dcc163262914e (92deae78) Text, 2.18 KB
T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.node.list
Tff7b72import T7ee787android.os.RemoteException
Tff7b72import T7ee787kotlinx.coroutines.Dispatchers
Tff7b72import T7ee787kotlinx.coroutines.withContext
Tff7b72import T7ee787org.meshtastic.core.data.repository.NodeRepository
Tff7b72import T7ee787org.meshtastic.core.database.model.Node
Tff7b72import T7ee787org.meshtastic.core.service.ServiceAction
Tff7b72import T7ee787org.meshtastic.core.service.ServiceRepository
Tff7b72import T7ee787timber.log.Timber
Tff7b72import T7ee787javax.inject.Inject
Tff7b72class T56d364NodeActions
Tf0883e@Inject
Tff7b72constructorTb4b4b4(
Tff7b72private Tff7b72val Te6edf3serviceRepositoryTb4b4b4: Te6edf3ServiceRepositoryTb4b4b4,
Tff7b72private Tff7b72val Te6edf3nodeRepositoryTb4b4b4: Te6edf3NodeRepositoryTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72suspend Tff7b72fun Td2a8fffavoriteNodeTb4b4b4(Te6edf3nodeTb4b4b4: Te6edf3NodeTb4b4b4) Tb4b4b4{
Tff7b72try Tb4b4b4{
Te6edf3serviceRepositoryTb4b4b4.Te6edf3onServiceActionTb4b4b4(Te6edf3ServiceActionTb4b4b4.Te6edf3FavoriteTb4b4b4(Te6edf3nodeTb4b4b4)Tb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Te6edf3exTb4b4b4: Te6edf3RemoteExceptionTb4b4b4) Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3eTb4b4b4(Te6edf3exTb4b4b4, Ta5d6ff"Ta5d6ffFavorite node errorTa5d6ff"Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tff7b72suspend Tff7b72fun Td2a8ffignoreNodeTb4b4b4(Te6edf3nodeTb4b4b4: Te6edf3NodeTb4b4b4) Tb4b4b4{
Tff7b72try Tb4b4b4{
Te6edf3serviceRepositoryTb4b4b4.Te6edf3onServiceActionTb4b4b4(Te6edf3ServiceActionTb4b4b4.Te6edf3IgnoreTb4b4b4(Te6edf3nodeTb4b4b4)Tb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Te6edf3exTb4b4b4: Te6edf3RemoteExceptionTb4b4b4) Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3eTb4b4b4(Te6edf3exTb4b4b4, Ta5d6ff"Ta5d6ffIgnore node errorTa5d6ff"Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tff7b72suspend Tff7b72fun Td2a8ffremoveNodeTb4b4b4(Te6edf3nodeNumTb4b4b4: Tffa657IntTb4b4b4) Tff7b72= Te6edf3withContextTb4b4b4(Te6edf3DispatchersTb4b4b4.Te6edf3IOTb4b4b4) Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3iTb4b4b4(Ta5d6ff"Ta5d6ffRemoving node 'Tffd700$Te6edf3nodeNumTa5d6ff'Ta5d6ff"Tb4b4b4)
Tff7b72try Tb4b4b4{
Tff7b72val Te6edf3packetId Tff7b72= Te6edf3serviceRepositoryTb4b4b4.Te6edf3meshServiceTff7b72?.Te6edf3packetId Tff7b72?: Tff7b72returnTf0883e@withContext
Te6edf3serviceRepositoryTb4b4b4.Te6edf3meshServiceTff7b72?.Te6edf3removeByNodenumTb4b4b4(Te6edf3packetIdTb4b4b4, Te6edf3nodeNumTb4b4b4)
Te6edf3nodeRepositoryTb4b4b4.Te6edf3deleteNodeTb4b4b4(Te6edf3nodeNumTb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Te6edf3exTb4b4b4: Te6edf3RemoteExceptionTb4b4b4) Tb4b4b4{
Te6edf3TimberTb4b4b4.Te6edf3eTb4b4b4(Ta5d6ff"Ta5d6ffRemove node error: Tffd700${Te6edf3exTb4b4b4.Te6edf3messageTffd700}Ta5d6ff"Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.05s